
// 操作枚举
const Operation = {
  RISK_REMIND: 'risk_remind', // 风险提示
  SHARE: 'share' // 分享
}

// 接口枚举
const InterfaceEnum = {

}

const IndexPageName = 'index'

const chartOption = {
  grid: [
    {
      left: '0',
      top: '0',
      width: '50%',
      height: '100%'
    },
    {
      left: '50%',
      top: '0',
      width: '50%',
      height: '100%'
    }
  ],
  xAxis: [
    {
      data: [],
      axisLine: {
        show: false
      },
      axisTick: {
        show: false
      },
      axisLabel: {
        show: true,
        inside: false,
        margin: 1,
        interval: function (index) {
          if (index === 0 || index === 29) {
            return true
          } else {
            return false
          }
        },
        formatter: function (value, index) {
          if (index === 0) {
            return '                      ' + value
          } else if (index === 29) {
            return value + '                      '
          } else {
            return ''
          }
        },
        textStyle: {
          fontSize: 9,
          color: '#999',
          align: 'center'
        }
      },
      z: 3
    },
    {
      data: [],
      gridIndex: 1,
      axisLine: {
        show: false
      },
      axisTick: {
        show: false
      },
      axisLabel: {
        show: true,
        inside: false,
        margin: 1,
        interval: function (index) {
          if (index === 29) {
            return true
          } else {
            return false
          }
        },
        formatter: function (value, index) {
          if (index === 29) {
            return value + '                      '
          } else {
            return ''
          }
        },
        textStyle: {
          fontSize: 9,
          color: '#999',
          align: 'center'
        }
      },
      z: 3
    }
  ],
  yAxis: [
    {
      min: 0,
      max: 100,
      interval: 25,
      axisLine: {
        show: false
      },
      axisTick: {
        show: false
      },
      axisLabel: {
        show: false
      },
      splitLine: {
        show: false
      }
    },
    {
      min: 0,
      max: 100,
      interval: 25,
      gridIndex: 1,
      axisLine: {
        show: false
      },
      axisTick: {
        show: false
      },
      axisLabel: {
        show: false
      },
      splitLine: {
        show: false
      }
    }
  ],
  series: [
    {
      data: [],
      type: 'candlestick',
      barMaxWidth: 8,
      itemStyle: {
        normal: {
          color: '#eb333b',
          color0: '#1aae52',
          borderColor: '#eb333b',
          borderColor0: '#1aae52'
        }
      }
    },
    {
      data: [],
      type: 'line',
      xAxisIndex: 1,
      yAxisIndex: 1,
      symbol: 'none',
      symbolSize: 20,
      smooth: true,
      lineStyle: {
        normal: {
          color: '#bac9d8'
        }
      }
    },
    {
      data: [],
      type: 'candlestick',
      xAxisIndex: 1,
      yAxisIndex: 1,
      barMaxWidth: 8,
      itemStyle: {
        normal: {
          color: '#eb333b',
          color0: '#1aae52',
          borderColor: '#eb333b',
          borderColor0: '#1aae52'
        }
      }
    }
  ]
}

export default {
  baseURL: 'http://www.gtja.com/xskx/',
  Operation,
  InterfaceEnum,
  chartOption,
  IndexPageName
}
